/* SmartUI Studio - 设备页面样式 */

/* 设备路径 */
.device-path {
    display: flex;
    align-items: center;
}

.separator {
    margin: 0 8px;
    color: var(--gray-color);
}

.path {
    color: var(--gray-color);
    font-weight: 500;
}

/* 主容器 */
.device-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px;
    height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
    background-color: var(--light-color);
}

/* Shell 面板 */
.shell-panel {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: #f8f9fa;
}

.panel-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.panel-actions {
    display: flex;
    gap: 8px;
}

/* 终端 */
.terminal-container {
    flex: 1;
    background-color: #1e1e1e;
    color: #f8f9fa;
    font-family: monospace;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 12px;
}

.terminal-line {
    padding: 2px 0;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-line.error {
    color: #f44336;
}

.terminal-line.success {
    color: #4caf50;
}

.terminal-line.warning {
    color: #ff9800;
}

.terminal-input-container {
    display: flex;
    align-items: center;
    background-color: #2d2d2d;
    padding: 8px;
    border-radius: 4px;
}

.prompt {
    color: #4caf50;
    margin-right: 8px;
    white-space: nowrap;
}

.terminal-input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-family: monospace;
    outline: none;
}

.terminal-toolbar {
    padding: 8px;
    border-top: 1px solid var(--border-color);
    background-color: #f8f9fa;
}

/* 设备屏幕面板 */
.device-screen-panel {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 设备框架 */
.device-frame {
    width: 320px;
    height: 640px;
    background-color: white;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 8px solid #333;
    margin: 20px auto;
}

.device-status-bar {
    height: 24px;
    background-color: #333;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    font-size: 12px;
}

.status-right {
    display: flex;
    gap: 6px;
}

.device-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.device-home {
    height: 100%;
    background-image: linear-gradient(to bottom, #4285f4, #34a853);
    padding: 16px;
    overflow-y: auto;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 16px 0;
}

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.app-icon i {
    width: 48px;
    height: 48px;
    background-color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.app-icon span {
    font-size: 12px;
    color: white;
    text-align: center;
}

.device-navigation {
    height: 48px;
    background-color: #333;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: none;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* 设备信息 */
.device-info {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.info-label {
    font-weight: 500;
    color: var(--gray-color);
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-online {
    background-color: #e6f4ea;
    color: var(--secondary-color);
}

.status-offline {
    background-color: #f1f3f4;
    color: var(--gray-color);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .device-container {
        grid-template-columns: 1fr;
    }
    
    .device-frame {
        width: 240px;
        height: 480px;
    }
    
    .app-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .device-container {
        padding: 8px;
        gap: 8px;
    }
    
    .panel-header {
        padding: 8px 12px;
    }
    
    .panel-header h5 {
        font-size: 14px;
    }
}